// https://github.com/DevX8000/ESP32-PCNT-Arduino-Example/blob/master/src/main.cpp
struct FanSpeedMonitor{
    static void restart();
    static void init();
    // read out with getRPS
    static void update();
    // return: time elapsed sine last update
    //         unit: ms
    //         capped at 10000
    static int getRPS(int channel, int* rpsOut);
    // decide is time out
    static void clearInterval(int channel);
};